package com.shenmazong.serverpagehelper.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shenmazong.serverpagehelper.pojo.TbBook;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component(value = "iTbBookMapper")
public interface ITbBookMapper extends BaseMapper<TbBook> {

    @Select("select * from tb_book")
    IPage<TbBook> selectBookByPage(Page<TbBook> page);

    List<TbBook> selectBookForEachPage(List<Integer> ids);

    IPage<TbBook> selectBookByMyPage(Page<TbBook> page);
}
